package com.smvc.handlers;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.smvc.entities.User;

@Controller
@RequestMapping("data")
public class JsonController {
	
	@RequestMapping("json")
	@ResponseBody
	public List<User> findAllUsers(){
		List<User> uList = new ArrayList<>();
		uList.add(new User(1, "liuxing"));
		uList.add(new User(5, "zhangsan"));
		return uList;
	}
}
